package com.example.bizprovider.api;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RefreshScope
@RestController
@Slf4j
public class HelloController {


    @Autowired
    private Environment env;

    @GetMapping("/test")
    public String test(){
        log.info("test--req-----");
        return env.getProperty("from", "undefined");
    }
}
